<template>
	<view>
		<!-- 聊天列表 -->
		<block v-for="(item,index) in list" :key="index">
			<user-chat-list :item="item" :index="index"/>
		</block>
		<!-- 聊天输入框 -->
	    <user-chat-bottom @textSubmit="textSubmit"/>
	</view>
</template>

<script>
	import userChatBottom from '../../components/user-chat/user-chat-bottom.vue';
	import userChatList from '../../components/user-list/user-chat-list.vue';
	import time from '../../common/time.js';
	export default {
		data() {
			return {
				list:[
					{
						isme:false,
						userpic:'../../static/demo/userpic/11.jpg',
						type: 'text',
						data:'随便随便随便随便随便随便随便随便随便',
						time:'14:23'
					},
					{
						isme:true,
						userpic:'../../static/demo/userpic/12.jpg',
						type: 'img',
						data:'../../static/demo/3.jpg',
						time:'14:50'
					}
				]
			}
		},
		onLoad(){
			
		},
		methods: {
			textSubmit(text){
				console.log('发言==',text);
			}
		},
		components:{
			userChatBottom,
			userChatList
		}
	}
</script>

<style scoped>
</style>
